// Copyright 2018 The gooid Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package camera

import (
	"fmt"
)

func (t MetadataTag) String() string {
	switch t {
	default:
		return fmt.Sprintf("UNKNOW_METADATATAG_%d", t)
	case COLOR_CORRECTION_MODE:
		return "CAMERA_COLOR_CORRECTION_MODE"
	case COLOR_CORRECTION_TRANSFORM:
		return "CAMERA_COLOR_CORRECTION_TRANSFORM"
	case COLOR_CORRECTION_GAINS:
		return "CAMERA_COLOR_CORRECTION_GAINS"
	case COLOR_CORRECTION_ABERRATION_MODE:
		return "CAMERA_COLOR_CORRECTION_ABERRATION_MODE"
	case COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES:
		return "CAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES"
	case COLOR_CORRECTION_END:
		return "CAMERA_COLOR_CORRECTION_END"
	case CONTROL_AE_ANTIBANDING_MODE:
		return "CAMERA_CONTROL_AE_ANTIBANDING_MODE"
	case CONTROL_AE_EXPOSURE_COMPENSATION:
		return "CAMERA_CONTROL_AE_EXPOSURE_COMPENSATION"
	case CONTROL_AE_LOCK:
		return "CAMERA_CONTROL_AE_LOCK"
	case CONTROL_AE_MODE:
		return "CAMERA_CONTROL_AE_MODE"
	case CONTROL_AE_REGIONS:
		return "CAMERA_CONTROL_AE_REGIONS"
	case CONTROL_AE_TARGET_FPS_RANGE:
		return "CAMERA_CONTROL_AE_TARGET_FPS_RANGE"
	case CONTROL_AE_PRECAPTURE_TRIGGER:
		return "CAMERA_CONTROL_AE_PRECAPTURE_TRIGGER"
	case CONTROL_AF_MODE:
		return "CAMERA_CONTROL_AF_MODE"
	case CONTROL_AF_REGIONS:
		return "CAMERA_CONTROL_AF_REGIONS"
	case CONTROL_AF_TRIGGER:
		return "CAMERA_CONTROL_AF_TRIGGER"
	case CONTROL_AWB_LOCK:
		return "CAMERA_CONTROL_AWB_LOCK"
	case CONTROL_AWB_MODE:
		return "CAMERA_CONTROL_AWB_MODE"
	case CONTROL_AWB_REGIONS:
		return "CAMERA_CONTROL_AWB_REGIONS"
	case CONTROL_CAPTURE_INTENT:
		return "CAMERA_CONTROL_CAPTURE_INTENT"
	case CONTROL_EFFECT_MODE:
		return "CAMERA_CONTROL_EFFECT_MODE"
	case CONTROL_MODE:
		return "CAMERA_CONTROL_MODE"
	case CONTROL_SCENE_MODE:
		return "CAMERA_CONTROL_SCENE_MODE"
	case CONTROL_VIDEO_STABILIZATION_MODE:
		return "CAMERA_CONTROL_VIDEO_STABILIZATION_MODE"
	case CONTROL_AE_AVAILABLE_ANTIBANDING_MODES:
		return "CAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES"
	case CONTROL_AE_AVAILABLE_MODES:
		return "CAMERA_CONTROL_AE_AVAILABLE_MODES"
	case CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES:
		return "CAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES"
	case CONTROL_AE_COMPENSATION_RANGE:
		return "CAMERA_CONTROL_AE_COMPENSATION_RANGE"
	case CONTROL_AE_COMPENSATION_STEP:
		return "CAMERA_CONTROL_AE_COMPENSATION_STEP"
	case CONTROL_AF_AVAILABLE_MODES:
		return "CAMERA_CONTROL_AF_AVAILABLE_MODES"
	case CONTROL_AVAILABLE_EFFECTS:
		return "CAMERA_CONTROL_AVAILABLE_EFFECTS"
	case CONTROL_AVAILABLE_SCENE_MODES:
		return "CAMERA_CONTROL_AVAILABLE_SCENE_MODES"
	case CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES:
		return "CAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES"
	case CONTROL_AWB_AVAILABLE_MODES:
		return "CAMERA_CONTROL_AWB_AVAILABLE_MODES"
	case CONTROL_MAX_REGIONS:
		return "CAMERA_CONTROL_MAX_REGIONS"
	case CONTROL_AE_STATE:
		return "CAMERA_CONTROL_AE_STATE"
	case CONTROL_AF_STATE:
		return "CAMERA_CONTROL_AF_STATE"
	case CONTROL_AWB_STATE:
		return "CAMERA_CONTROL_AWB_STATE"
	case CONTROL_AE_LOCK_AVAILABLE:
		return "CAMERA_CONTROL_AE_LOCK_AVAILABLE"
	case CONTROL_AWB_LOCK_AVAILABLE:
		return "CAMERA_CONTROL_AWB_LOCK_AVAILABLE"
	case CONTROL_AVAILABLE_MODES:
		return "CAMERA_CONTROL_AVAILABLE_MODES"
	case CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE:
		return "CAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE"
	case CONTROL_POST_RAW_SENSITIVITY_BOOST:
		return "CAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST"
	case CONTROL_ENABLE_ZSL:
		return "CAMERA_CONTROL_ENABLE_ZSL"
	case CONTROL_END:
		return "CAMERA_CONTROL_END"
	case EDGE_MODE:
		return "CAMERA_EDGE_MODE"
	case EDGE_AVAILABLE_EDGE_MODES:
		return "CAMERA_EDGE_AVAILABLE_EDGE_MODES"
	case EDGE_END:
		return "CAMERA_EDGE_END"
	case FLASH_MODE:
		return "CAMERA_FLASH_MODE"
	case FLASH_STATE:
		return "CAMERA_FLASH_STATE"
	case FLASH_END:
		return "CAMERA_FLASH_END"
	case FLASH_INFO_AVAILABLE:
		return "CAMERA_FLASH_INFO_AVAILABLE"
	case FLASH_INFO_END:
		return "CAMERA_FLASH_INFO_END"
	case HOT_PIXEL_MODE:
		return "CAMERA_HOT_PIXEL_MODE"
	case HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES:
		return "CAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES"
	case HOT_PIXEL_END:
		return "CAMERA_HOT_PIXEL_END"
	case JPEG_GPS_COORDINATES:
		return "CAMERA_JPEG_GPS_COORDINATES"
	case JPEG_GPS_PROCESSING_METHOD:
		return "CAMERA_JPEG_GPS_PROCESSING_METHOD"
	case JPEG_GPS_TIMESTAMP:
		return "CAMERA_JPEG_GPS_TIMESTAMP"
	case JPEG_ORIENTATION:
		return "CAMERA_JPEG_ORIENTATION"
	case JPEG_QUALITY:
		return "CAMERA_JPEG_QUALITY"
	case JPEG_THUMBNAIL_QUALITY:
		return "CAMERA_JPEG_THUMBNAIL_QUALITY"
	case JPEG_THUMBNAIL_SIZE:
		return "CAMERA_JPEG_THUMBNAIL_SIZE"
	case JPEG_AVAILABLE_THUMBNAIL_SIZES:
		return "CAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES"
	case JPEG_END:
		return "CAMERA_JPEG_END"
	case LENS_APERTURE:
		return "CAMERA_LENS_APERTURE"
	case LENS_FILTER_DENSITY:
		return "CAMERA_LENS_FILTER_DENSITY"
	case LENS_FOCAL_LENGTH:
		return "CAMERA_LENS_FOCAL_LENGTH"
	case LENS_FOCUS_DISTANCE:
		return "CAMERA_LENS_FOCUS_DISTANCE"
	case LENS_OPTICAL_STABILIZATION_MODE:
		return "CAMERA_LENS_OPTICAL_STABILIZATION_MODE"
	case LENS_FACING:
		return "CAMERA_LENS_FACING"
	case LENS_POSE_ROTATION:
		return "CAMERA_LENS_POSE_ROTATION"
	case LENS_POSE_TRANSLATION:
		return "CAMERA_LENS_POSE_TRANSLATION"
	case LENS_FOCUS_RANGE:
		return "CAMERA_LENS_FOCUS_RANGE"
	case LENS_STATE:
		return "CAMERA_LENS_STATE"
	case LENS_INTRINSIC_CALIBRATION:
		return "CAMERA_LENS_INTRINSIC_CALIBRATION"
	case LENS_RADIAL_DISTORTION:
		return "CAMERA_LENS_RADIAL_DISTORTION"
	case LENS_END:
		return "CAMERA_LENS_END"
	case LENS_INFO_AVAILABLE_APERTURES:
		return "CAMERA_LENS_INFO_AVAILABLE_APERTURES"
	case LENS_INFO_AVAILABLE_FILTER_DENSITIES:
		return "CAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES"
	case LENS_INFO_AVAILABLE_FOCAL_LENGTHS:
		return "CAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS"
	case LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION:
		return "CAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION"
	case LENS_INFO_HYPERFOCAL_DISTANCE:
		return "CAMERA_LENS_INFO_HYPERFOCAL_DISTANCE"
	case LENS_INFO_MINIMUM_FOCUS_DISTANCE:
		return "CAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE"
	case LENS_INFO_SHADING_MAP_SIZE:
		return "CAMERA_LENS_INFO_SHADING_MAP_SIZE"
	case LENS_INFO_FOCUS_DISTANCE_CALIBRATION:
		return "CAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION"
	case LENS_INFO_END:
		return "CAMERA_LENS_INFO_END"
	case NOISE_REDUCTION_MODE:
		return "CAMERA_NOISE_REDUCTION_MODE"
	case NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES:
		return "CAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES"
	case NOISE_REDUCTION_END:
		return "CAMERA_NOISE_REDUCTION_END"
	case REQUEST_MAX_NUM_OUTPUT_STREAMS:
		return "CAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS"
	case REQUEST_PIPELINE_DEPTH:
		return "CAMERA_REQUEST_PIPELINE_DEPTH"
	case REQUEST_PIPELINE_MAX_DEPTH:
		return "CAMERA_REQUEST_PIPELINE_MAX_DEPTH"
	case REQUEST_PARTIAL_RESULT_COUNT:
		return "CAMERA_REQUEST_PARTIAL_RESULT_COUNT"
	case REQUEST_AVAILABLE_CAPABILITIES:
		return "CAMERA_REQUEST_AVAILABLE_CAPABILITIES"
	case REQUEST_AVAILABLE_REQUEST_KEYS:
		return "CAMERA_REQUEST_AVAILABLE_REQUEST_KEYS"
	case REQUEST_AVAILABLE_RESULT_KEYS:
		return "CAMERA_REQUEST_AVAILABLE_RESULT_KEYS"
	case REQUEST_AVAILABLE_CHARACTERISTICS_KEYS:
		return "CAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS"
	case REQUEST_END:
		return "CAMERA_REQUEST_END"
	case SCALER_CROP_REGION:
		return "CAMERA_SCALER_CROP_REGION"
	case SCALER_AVAILABLE_MAX_DIGITAL_ZOOM:
		return "CAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM"
	case SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
		return "CAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS"
	case SCALER_AVAILABLE_MIN_FRAME_DURATIONS:
		return "CAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS"
	case SCALER_AVAILABLE_STALL_DURATIONS:
		return "CAMERA_SCALER_AVAILABLE_STALL_DURATIONS"
	case SCALER_CROPPING_TYPE:
		return "CAMERA_SCALER_CROPPING_TYPE"
	case SCALER_END:
		return "CAMERA_SCALER_END"
	case SENSOR_EXPOSURE_TIME:
		return "CAMERA_SENSOR_EXPOSURE_TIME"
	case SENSOR_FRAME_DURATION:
		return "CAMERA_SENSOR_FRAME_DURATION"
	case SENSOR_SENSITIVITY:
		return "CAMERA_SENSOR_SENSITIVITY"
	case SENSOR_REFERENCE_ILLUMINANT1:
		return "CAMERA_SENSOR_REFERENCE_ILLUMINANT1"
	case SENSOR_REFERENCE_ILLUMINANT2:
		return "CAMERA_SENSOR_REFERENCE_ILLUMINANT2"
	case SENSOR_CALIBRATION_TRANSFORM1:
		return "CAMERA_SENSOR_CALIBRATION_TRANSFORM1"
	case SENSOR_CALIBRATION_TRANSFORM2:
		return "CAMERA_SENSOR_CALIBRATION_TRANSFORM2"
	case SENSOR_COLOR_TRANSFORM1:
		return "CAMERA_SENSOR_COLOR_TRANSFORM1"
	case SENSOR_COLOR_TRANSFORM2:
		return "CAMERA_SENSOR_COLOR_TRANSFORM2"
	case SENSOR_FORWARD_MATRIX1:
		return "CAMERA_SENSOR_FORWARD_MATRIX1"
	case SENSOR_FORWARD_MATRIX2:
		return "CAMERA_SENSOR_FORWARD_MATRIX2"
	case SENSOR_BLACK_LEVEL_PATTERN:
		return "CAMERA_SENSOR_BLACK_LEVEL_PATTERN"
	case SENSOR_MAX_ANALOG_SENSITIVITY:
		return "CAMERA_SENSOR_MAX_ANALOG_SENSITIVITY"
	case SENSOR_ORIENTATION:
		return "CAMERA_SENSOR_ORIENTATION"
	case SENSOR_TIMESTAMP:
		return "CAMERA_SENSOR_TIMESTAMP"
	case SENSOR_NEUTRAL_COLOR_POINT:
		return "CAMERA_SENSOR_NEUTRAL_COLOR_POINT"
	case SENSOR_NOISE_PROFILE:
		return "CAMERA_SENSOR_NOISE_PROFILE"
	case SENSOR_GREEN_SPLIT:
		return "CAMERA_SENSOR_GREEN_SPLIT"
	case SENSOR_TEST_PATTERN_DATA:
		return "CAMERA_SENSOR_TEST_PATTERN_DATA"
	case SENSOR_TEST_PATTERN_MODE:
		return "CAMERA_SENSOR_TEST_PATTERN_MODE"
	case SENSOR_AVAILABLE_TEST_PATTERN_MODES:
		return "CAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES"
	case SENSOR_ROLLING_SHUTTER_SKEW:
		return "CAMERA_SENSOR_ROLLING_SHUTTER_SKEW"
	case SENSOR_OPTICAL_BLACK_REGIONS:
		return "CAMERA_SENSOR_OPTICAL_BLACK_REGIONS"
	case SENSOR_DYNAMIC_BLACK_LEVEL:
		return "CAMERA_SENSOR_DYNAMIC_BLACK_LEVEL"
	case SENSOR_DYNAMIC_WHITE_LEVEL:
		return "CAMERA_SENSOR_DYNAMIC_WHITE_LEVEL"
	case SENSOR_END:
		return "CAMERA_SENSOR_END"
	case SENSOR_INFO_ACTIVE_ARRAY_SIZE:
		return "CAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE"
	case SENSOR_INFO_SENSITIVITY_RANGE:
		return "CAMERA_SENSOR_INFO_SENSITIVITY_RANGE"
	case SENSOR_INFO_COLOR_FILTER_ARRANGEMENT:
		return "CAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT"
	case SENSOR_INFO_EXPOSURE_TIME_RANGE:
		return "CAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE"
	case SENSOR_INFO_MAX_FRAME_DURATION:
		return "CAMERA_SENSOR_INFO_MAX_FRAME_DURATION"
	case SENSOR_INFO_PHYSICAL_SIZE:
		return "CAMERA_SENSOR_INFO_PHYSICAL_SIZE"
	case SENSOR_INFO_PIXEL_ARRAY_SIZE:
		return "CAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE"
	case SENSOR_INFO_WHITE_LEVEL:
		return "CAMERA_SENSOR_INFO_WHITE_LEVEL"
	case SENSOR_INFO_TIMESTAMP_SOURCE:
		return "CAMERA_SENSOR_INFO_TIMESTAMP_SOURCE"
	case SENSOR_INFO_LENS_SHADING_APPLIED:
		return "CAMERA_SENSOR_INFO_LENS_SHADING_APPLIED"
	case SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE:
		return "CAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE"
	case SENSOR_INFO_END:
		return "CAMERA_SENSOR_INFO_END"
	case SHADING_MODE:
		return "CAMERA_SHADING_MODE"
	case SHADING_AVAILABLE_MODES:
		return "CAMERA_SHADING_AVAILABLE_MODES"
	case SHADING_END:
		return "CAMERA_SHADING_END"
	case STATISTICS_FACE_DETECT_MODE:
		return "CAMERA_STATISTICS_FACE_DETECT_MODE"
	case STATISTICS_HOT_PIXEL_MAP_MODE:
		return "CAMERA_STATISTICS_HOT_PIXEL_MAP_MODE"
	case STATISTICS_FACE_IDS:
		return "CAMERA_STATISTICS_FACE_IDS"
	case STATISTICS_FACE_LANDMARKS:
		return "CAMERA_STATISTICS_FACE_LANDMARKS"
	case STATISTICS_FACE_RECTANGLES:
		return "CAMERA_STATISTICS_FACE_RECTANGLES"
	case STATISTICS_FACE_SCORES:
		return "CAMERA_STATISTICS_FACE_SCORES"
	case STATISTICS_LENS_SHADING_MAP:
		return "CAMERA_STATISTICS_LENS_SHADING_MAP"
	case STATISTICS_SCENE_FLICKER:
		return "CAMERA_STATISTICS_SCENE_FLICKER"
	case STATISTICS_HOT_PIXEL_MAP:
		return "CAMERA_STATISTICS_HOT_PIXEL_MAP"
	case STATISTICS_LENS_SHADING_MAP_MODE:
		return "CAMERA_STATISTICS_LENS_SHADING_MAP_MODE"
	case STATISTICS_END:
		return "CAMERA_STATISTICS_END"
	case STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES:
		return "CAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES"
	case STATISTICS_INFO_MAX_FACE_COUNT:
		return "CAMERA_STATISTICS_INFO_MAX_FACE_COUNT"
	case STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES:
		return "CAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES"
	case STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES:
		return "CAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES"
	case STATISTICS_INFO_END:
		return "CAMERA_STATISTICS_INFO_END"
	case TONEMAP_CURVE_BLUE:
		return "CAMERA_TONEMAP_CURVE_BLUE"
	case TONEMAP_CURVE_GREEN:
		return "CAMERA_TONEMAP_CURVE_GREEN"
	case TONEMAP_CURVE_RED:
		return "CAMERA_TONEMAP_CURVE_RED"
	case TONEMAP_MODE:
		return "CAMERA_TONEMAP_MODE"
	case TONEMAP_MAX_CURVE_POINTS:
		return "CAMERA_TONEMAP_MAX_CURVE_POINTS"
	case TONEMAP_AVAILABLE_TONE_MAP_MODES:
		return "CAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES"
	case TONEMAP_GAMMA:
		return "CAMERA_TONEMAP_GAMMA"
	case TONEMAP_PRESET_CURVE:
		return "CAMERA_TONEMAP_PRESET_CURVE"
	case TONEMAP_END:
		return "CAMERA_TONEMAP_END"
	case INFO_SUPPORTED_HARDWARE_LEVEL:
		return "CAMERA_INFO_SUPPORTED_HARDWARE_LEVEL"
	case INFO_END:
		return "CAMERA_INFO_END"
	case BLACK_LEVEL_LOCK:
		return "CAMERA_BLACK_LEVEL_LOCK"
	case BLACK_LEVEL_END:
		return "CAMERA_BLACK_LEVEL_END"
	case SYNC_FRAME_NUMBER:
		return "CAMERA_SYNC_FRAME_NUMBER"
	case SYNC_MAX_LATENCY:
		return "CAMERA_SYNC_MAX_LATENCY"
	case SYNC_END:
		return "CAMERA_SYNC_END"
	case DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS:
		return "CAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS"
	case DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS:
		return "CAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS"
	case DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS:
		return "CAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS"
	case DEPTH_DEPTH_IS_EXCLUSIVE:
		return "CAMERA_DEPTH_DEPTH_IS_EXCLUSIVE"
	case DEPTH_END:
		return "CAMERA_DEPTH_END"
	}
}

func (r *MetadataRational) String() string {
	return fmt.Sprintf("Rational{%d, %d}", r.Numerator(), r.Denominator())
}
